﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Shop.Page.Repositories;
using Shop.Page.Models;

namespace Shop.Page.Services
{
    /// <summary>
    /// 业务逻辑层
    /// </summary>
    public class HomeBottomAccess
    {
        Repositories.HomeBottomAccess dal = new Repositories.HomeBottomAccess();
        /// <summary>
        /// 根据类型获取底部信息
        /// </summary>
        /// <param name="Type">0主标题1子链接</param>
        /// <returns></returns>
        public IList<HomeBottom> GetHomeBottomInfoByType(int Type)
        {
            return dal.GetHomeBottomInfoByType(Type);
        }
        /// <summary>
        /// 根据所述父级获取信息
        /// </summary>
        /// <param name="Superior"></param>
        /// <returns></returns>
        public IList<HomeBottom> GetHomeBottomInfoBySuperior(int Superior)
        {
            return dal.GetHomeBottomInfoBySuperior(Superior);
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="hinfo"></param>
        /// <returns></returns>
        public object AddHomeBottomInfo(HomeBottom hinfo)
        {
            return dal.AddHomeBottomInfo(hinfo);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="hinfo"></param>
        /// <returns></returns>
        public int UpdateHomeBottomInfo(HomeBottom hinfo)
        {
            return dal.UpdateHomeBottomInfo(hinfo);
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="HBID"></param>
        /// <returns></returns>
        public int DelHomeBottomInfo(int HBID)
        {
            return dal.DelHomeBottomInfo(HBID);
        }
        /// <summary>
        /// 置顶
        /// </summary>
        /// <param name="HBID"></param>
        /// <returns></returns>
        public int Order(int HBID)
        {
            return dal.Order(HBID);
        }
    }
}
